﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace SmartAgricultureService.Tables
{
    [Table(("ReportDetail"))]
    public class ReportDetailEntry
    {
        [Key]
        [MaxLength(50)]
        public string Id { get; set; }
        public int Hour { get; set; }
        [Required]
        [MaxLength(50)]
        public string DeviceId { get; set; }
        [Required]
        [MaxLength(50)]
        public string ReportId { get; set; }
        public decimal MinHumidity { get; set; }
        public decimal MinTemperature { get; set; }
        public decimal MinIllumination { get; set; }
        public decimal MaxHumidity { get; set; }
        public decimal MaxTemperature { get; set; }
        public decimal MaxIllumination { get; set; }
        public decimal AvgHumidity { get; set; }
        public decimal AvgTemperature { get; set; }
        public decimal AvgIllumination { get; set; }
        [MaxLength(int.MaxValue)]
        public string Description { get; set; }
        public virtual ReportEntry Report { get; set; }
        public virtual DeviceEntry Device { get; set; }
    }
}